package main

import "fmt"

type base struct {
	num int
}

func (b base) describe() string {
	return fmt.Sprintf("base with num=%v", b.num)

}

type container struct {
	base
	str string
}

func main() {
	co := container{
		base: base{
			num: 2,
		},
		str: "some name",
	}
	fmt.Println("co", co) //2

	fmt.Println("co={num: %v,str: %v}\n", co.num, co.str) // 2 some name
	fmt.Println("also num", co.base.num)                  //2

	fmt.Println("describe:", co.describe())

	type describeer interface {
		describe() string
	}
	var d describeer = co
	fmt.Println("describer:", d.describe())

}
